package com.pikaqiu.warehouse.domain.dto;

import com.pikaqiu.warehouse.domain.entity.Company;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: Administrator
 * @Date: 2024/8/15
 */
@Data
public class CompanyIndexDto {

    private Integer id;

    private String companyName;

    private String companyImage;

    private String nickName;

    private Integer productNum;

    private Integer materialNum;

    private Integer todayProduct;

    public CompanyIndexDto(Company company, String nickName, BigDecimal productNum, BigDecimal materialsNum) {
        this.id = company.getId();
        this.companyName = company.getCompanyName();
        this.companyImage = company.getImage();
        this.productNum = productNum.intValue();
        this.materialNum = materialsNum.intValue();
        this.nickName = nickName;
        this.todayProduct = 0;
    }
}
